package hbm;

import java.math.BigDecimal;

/**
 * AbstractVentasId entity provides the base persistence definition of the
 * VentasId entity. @author MyEclipse Persistence Tools
 */

public abstract class AbstractVentasId implements java.io.Serializable {

	// Fields

	private int id;
	private Factura factura;
	private Cliente cliente;
	private Empleados empleados;
	private Sucursal sucursal;
	private Boolean tipoPago;

	// Constructors

	/** default constructor */
	public AbstractVentasId() {
	}

	/** minimal constructor */
	public AbstractVentasId(Factura factura, Cliente cliente,
			Empleados empleados, Sucursal sucursal, Boolean tipoPago) {
		this.factura = factura;
		this.cliente = cliente;
		this.empleados = empleados;
		this.sucursal = sucursal;
		this.tipoPago = tipoPago;
	}

	/** full constructor */
	public AbstractVentasId(int id, Factura factura, Cliente cliente,
			Empleados empleados, Sucursal sucursal, Boolean tipoPago) {
		this.id = id;
		this.factura = factura;
		this.cliente = cliente;
		this.empleados = empleados;
		this.sucursal = sucursal;
		this.tipoPago = tipoPago;
	}

	// Property accessors

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Factura getFactura() {
		return this.factura;
	}

	public void setFactura(Factura factura) {
		this.factura = factura;
	}

	public Cliente getCliente() {
		return this.cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

	public Empleados getEmpleados() {
		return this.empleados;
	}

	public void setEmpleados(Empleados empleados) {
		this.empleados = empleados;
	}

	public Sucursal getSucursal() {
		return this.sucursal;
	}

	public void setSucursal(Sucursal sucursal) {
		this.sucursal = sucursal;
	}

	public Boolean getTipoPago() {
		return this.tipoPago;
	}

	public void setTipoPago(Boolean tipoPago) {
		this.tipoPago = tipoPago;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractVentasId))
			return false;
		AbstractVentasId castOther = (AbstractVentasId) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != 0
				&& castOther.getId() != 0 && this.getId()==
				castOther.getId()))
				&& ((this.getFactura() == castOther.getFactura()) || (this
						.getFactura() != null
						&& castOther.getFactura() != null && this.getFactura()
						.equals(castOther.getFactura())))
				&& ((this.getCliente() == castOther.getCliente()) || (this
						.getCliente() != null
						&& castOther.getCliente() != null && this.getCliente()
						.equals(castOther.getCliente())))
				&& ((this.getEmpleados() == castOther.getEmpleados()) || (this
						.getEmpleados() != null
						&& castOther.getEmpleados() != null && this
						.getEmpleados().equals(castOther.getEmpleados())))
				&& ((this.getSucursal() == castOther.getSucursal()) || (this
						.getSucursal() != null
						&& castOther.getSucursal() != null && this
						.getSucursal().equals(castOther.getSucursal())))
				&& ((this.getTipoPago() == castOther.getTipoPago()) || (this
						.getTipoPago() != null
						&& castOther.getTipoPago() != null && this
						.getTipoPago().equals(castOther.getTipoPago())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == 0 ? 0 : this.getId());
		result = 37 * result
				+ (getFactura() == null ? 0 : this.getFactura().hashCode());
		result = 37 * result
				+ (getCliente() == null ? 0 : this.getCliente().hashCode());
		result = 37 * result
				+ (getEmpleados() == null ? 0 : this.getEmpleados().hashCode());
		result = 37 * result
				+ (getSucursal() == null ? 0 : this.getSucursal().hashCode());
		result = 37 * result
				+ (getTipoPago() == null ? 0 : this.getTipoPago().hashCode());
		return result;
	}

}